#----------------------------------------------------------------------------
#       MAKEFILE
#
#	Controlling makefile for File Assistant
#
#	Created:	1st August 2005
#
#	Copyright (C) 1995-2005 T Swann
#----------------------------------------------------------------------------

#----------------------------------------------------------------------------
#	Target to make
#	--------------

#PATH 		:= /c/devkitPro/devkitPSP/bin:$(PATH)
SOURCE_DIR := ./
                                  
STATICLIB = liblogger.a
TARGET := loggerc
PSP_FW_VERSION=371

#----------------------------------------------------------------------------
#	Source to make
#	--------------

CLOGGER :=					$(SOURCE_DIR)loggerc.o

#CPPLOGGER :=				$(SOURCE_DIR)loggercpp.o

LIBOBJS :=					$(CLOGGER)

#LIBOBJSCPP :=					$(CPPLOGGER)

#----------------------------------------------------------------------------
#	Additional includes
#	-------------------

INCDIR   :=					$(INCDIR) \
							$(INCLUDE_DIR)

#----------------------------------------------------------------------------
#	Addditional libraries
#	---------------------
SDK_LIBS :=					-lpspsdk \
							-lpspctrl -lpsphprm \
							-lpsprtc \
							-lpsppower \
                            -lpsputility \

LIBS :=						$(SDK_LIBS) \
							-lm

#----------------------------------------------------------------------------
#	Preprocesser defines
#	--------------------

DEFINES :=					-D_DEBUG \
							-DPSP

#----------------------------------------------------------------------------
#	Compiler settings
#	-----------------

CFLAGS :=					$(DEFINES) -O2 -G0 -ggdb -Wall -DHAVE_AV_CONFIG_H -fno-strict-aliasing -fverbose-asm
#CFLAGS :=					$(DEFINES) -O2 -G0 -g -frename-registers -ffast-math -fomit-frame-pointer -Wall -DHAVE_AV_CONFIG_H -fno-strict-aliasing
CXXFLAGS :=					$(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS :=					$(CFLAGS)

LIBDIR :=

LDFLAGS :=

#----------------------------------------------------------------------------
#	Default build settings
#	----------------------

#test:
#	echo $(OBJS)

PSPSDK :=					$(shell psp-config --pspsdk-path)

include						$(PSPSDK)/lib/build.mak

#----------------------------------------------------------------------------
#	Copy to PSP
#	-----------

lib: $(STATICLIB)

#libcpp: $(STATICLIBCPP)

$(STATICLIB): $(LIBOBJS)
	$(AR) rcs $@ $(LIBOBJS)
	$(RANLIB) $@

#$(STATICLIBCPP): $(LIBOBJSCPP)
#	$(AR) rcs $@ $(LIBOBJSCPP)
#	$(RANLIB) $@
